package com.huse.usermanager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huse.usermanager.entity.SysUser;
import com.huse.usermanager.entity.UserExtend;
import com.huse.usermanager.mapper.SysUserMapper;
import com.huse.usermanager.service.SysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户信息表 服务实现类
 * </p>
 *
 * @author xinxin
 * @since 2021-05-27
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;
    @Override
    public Page<SysUser> getUserByPage(Page<SysUser> page, QueryWrapper<SysUser> wapper) {
        sysUserMapper.selectPage(page,wapper);
        return page;
    }

    @Override
    public List<UserExtend> getUserDetailInfoList(int start, int size) {
        return sysUserMapper.getUserDetailList(start, size);
    }
}
